﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ignitron.EEngine;
using Ignitron.EEngine.Maths;

namespace OpenTKLightingTool.Data
{
    /// <summary>
    /// Class holding a general lighting settings
    /// </summary>
    internal class Lighting
    {
        public EVector4 GlobalAmbient
        { get; set; }

        public bool LocalViewer
        { get; set; }

        public bool TwoSided
        { get; set; }

        /// <summary>
        /// Constructor - set default values
        /// </summary>
        public Lighting()
        {
            GlobalAmbient = new EVector4(0.2f, 0.2f, 0.2f, 1f);
            LocalViewer = false;
            TwoSided = false;
        }

        /// <summary>
        /// Renders the lighting
        /// </summary>
        public void Render(IEngine engine)
        {
            engine.SetGlobalAmbient(new EVector3(GlobalAmbient.X, GlobalAmbient.Y, GlobalAmbient.Z));
        }
    }
}
